package com.yzy.fly.annotation;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.TypeHandler;
import org.apache.ibatis.type.UnknownTypeHandler;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE})
//@TableField
public @interface FlyTableField{
//    @AliasFor(annotation = TableField.class, attribute = "value")
//    String value() default "";
//    @AliasFor(annotation = TableField.class, attribute = "exist")
//    boolean exist() default true;
//    @AliasFor(annotation = TableField.class, attribute = "condition")
//    String condition() default "";
//    @AliasFor(annotation = TableField.class, attribute = "update")
//    String update() default "";
//    @AliasFor(annotation = TableField.class, attribute = "insertStrategy")
//    FieldStrategy insertStrategy() default FieldStrategy.DEFAULT;
//    @AliasFor(annotation = TableField.class, attribute = "updateStrategy")
//    FieldStrategy updateStrategy() default FieldStrategy.DEFAULT;
//    @AliasFor(annotation = TableField.class, attribute = "whereStrategy")
//    FieldStrategy whereStrategy() default FieldStrategy.DEFAULT;
//    @AliasFor(annotation = TableField.class, attribute = "fill")
//    FieldFill fill() default FieldFill.DEFAULT;
//    @AliasFor(annotation = TableField.class, attribute = "select")
//    boolean select() default true;
//    @AliasFor(annotation = TableField.class, attribute = "keepGlobalFormat")
//    boolean keepGlobalFormat() default false;
//    @AliasFor(annotation = TableField.class, attribute = "property")
//    String property() default "";
//    @AliasFor(annotation = TableField.class, attribute = "jdbcType")
//    JdbcType jdbcType() default JdbcType.UNDEFINED;
//    @AliasFor(annotation = TableField.class, attribute = "typeHandler")
//    Class<? extends TypeHandler> typeHandler() default UnknownTypeHandler.class;
//    @AliasFor(annotation = TableField.class, attribute = "javaType")
//    boolean javaType() default false;
//    @AliasFor(annotation = TableField.class, attribute = "numericScale")
//    String numericScale() default "";

    int length() default 11;

    String numericScale() default "";
//    precision
    boolean notNull() default false;

    String defaultValue() default "";

    String comment() default "";

}
